<template>
  <vue-json-editor 
    v-model="JsonEditData" 
    :showBtns="true"
    :mode="'code'" 
    lang="zh" 
    @json-change="onJsonChange" 
    @json-save="onJsonSave" 
    />
</template>
<script>
import vueJsonEditor from "vue-json-editor";

export default {
  props: ["JsonEditData"],
  components: {
    vueJsonEditor,
  },
  data() {
      return {
      };
  },
  methods: {
    onJsonChange(value) {
      console.log("value:", value);
    },
    onJsonSave(value) {
      console.log("value:", value);
    },
  },
};
</script>
<style scoped>
/* jsoneditor右上角默认有一个链接,加css去掉了 */
.jsoneditor-poweredBy {
  display: none;
}
</style>